<?php

return array(
    'controllers' => array(
        'invokables' => array(
            'System\Controller\Index' => 'System\Controller\IndexController',
            'System\Controller\Catalog' => 'System\Controller\CatalogController',
            'System\Controller\Videos' => 'System\Controller\VideosController',
            'System\Controller\News' => 'System\Controller\NewsController',
            'System\Controller\Link' => 'System\Controller\LinkController',
            'System\Controller\Seo' => 'System\Controller\SeoController',
            'System\Controller\Setting' => 'System\Controller\SettingController',
            'System\Controller\Myimages' => 'System\Controller\MyimagesController',
            'System\Controller\Product' => 'System\Controller\ProductController',
        ),
    ),
    'router' => array(
        'routes' => array(
            //router Index System
            'indexadmin' => array(
                'type' => 'segment',
                'options' => array(
                    'route' => '/systemadmin',
                    'defaults' => array(
                        '__NAMESPACE__' => 'System\Controller',
                        'controller' => 'System\Controller\index',
                        'action' => 'index',
                    ),
                ),
            ),
            //change pass
            'changepass' => array(
                'type' => 'segment',
                'options' => array(
                    'route' => '/systemadmin/changepass',
                    'defaults' => array(
                        '__NAMESPACE__' => 'System\Controller',
                        'controller' => 'System\Controller\index',
                        'action' => 'changepass',
                    ),
                ),
            ),
            //câtlog
            'catalog' => array(
                'type' => 'segment',
                'options' => array(
                    'route' => '/systemadmin/catalog[/:action]',
                    'constraints' => array(
                        'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
                    ),
                    'defaults' => array(
                        '__NAMESPACE__' => 'System\Controller',
                        'controller' => 'System\Controller\Catalog',
                        'action' => 'index',
                    ),
                ),
            ),
            //videos
            'videosroute' => array(
                'type' => 'segment',
                'options' => array(
                    'route' => '/systemadmin/videos[/:action]',
                    'constraints' => array(
                        'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
                    ),
                    'defaults' => array(
                        '__NAMESPACE__' => 'System\Controller',
                        'controller' => 'System\Controller\Videos',
                        'action' => 'index',
                    ),
                ),
            ),
            'newsroute' => array(
                'type' => 'segment',
                'options' => array(
                    'route' => '/systemadmin/news[/:action]',
                    'constraints' => array(
                        'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
                    ),
                    'defaults' => array(
                        '__NAMESPACE__' => 'System\Controller',
                        'controller' => 'System\Controller\News',
                        'action' => 'index',
                    ),
                ),
            ),
            //lik adv
            'link' => array(
                'type' => 'segment',
                'options' => array(
                    'route' => '/systemadmin/link',
                    'defaults' => array(
                        '__NAMESPACE__' => 'System\Controller',
                        'controller' => 'System\Controller\Link',
                        'action' => 'index',
                    ),
                ),
            ),
            //lik adv
            'linkaction' => array(
                'type' => 'segment',
                'options' => array(
                    'route' => '/systemadmin/link/[:action]',
                    'constraints' => array(
                        'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
                    ),
                    'defaults' => array(
                        '__NAMESPACE__' => 'System\Controller',
                        'controller' => 'System\Controller\Link',
                        'action' => 'index',
                    ),
                ),
            ),
            //lik adv
            'seo' => array(
                'type' => 'segment',
                'options' => array(
                    'route' => '/systemadmin/seo/[:action]',
                    'constraints' => array(
                        'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
                    ),
                    'defaults' => array(
                        '__NAMESPACE__' => 'System\Controller',
                        'controller' => 'System\Controller\Seo',
                        'action' => 'index',
                    ),
                ),
            ),
            //setting adv
            'setting' => array(
                'type' => 'segment',
                'options' => array(
                    'route' => '/systemadmin/setting/[:action]',
                    'constraints' => array(
                        'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
                    ),
                    'defaults' => array(
                        '__NAMESPACE__' => 'System\Controller',
                        'controller' => 'System\Controller\Setting',
                        'action' => 'copyright',
                    ),
                ),
            ),
            //images
            'myfiles' => array(
                'type' => 'segment',
                'options' => array(
                    'route' => '/systemadmin/files/[:action]',
                    'constraints' => array(
                        'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
                    ),
                    'defaults' => array(
                        '__NAMESPACE__' => 'System\Controller',
                        'controller' => 'System\Controller\Myimages',
                        'action' => 'index',
                    ),
                ),
            ),
            //product
            'productrouter' => array(
                'type' => 'segment',
                'options' => array(
                    'route' => '/systemadmin/product/[:action]',
                    'contraints' => array(
                        'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
                    ),
                    'defaults' => array(
                        '__NAMESPACE__' => 'System\Controller',
                        'controller' => 'System\Controller\Product',
                        'action' => 'index',
                    ),
                ),
            ),
        ),
    ),
    'view_manager' => array(
        'display_not_found_reason' => true,
        'display_exceptions' => true,
        'not_found_template' => 'error/404',
        'exception_template' => 'error/index',
        'template_map' => array(
            'error/404' => __DIR__ . '/../view/error/404.phtml',
            'error/index' => __DIR__ . '/../view/error/index.phtml',
        ),
        'template_path_stack' => array(
            __DIR__ . '/../view',
        ),
    ),
);
